// scoll top
$('.scroll-top').click(function(event) {
    event.preventDefault();
    var divScrollTop = $(this).attr('href');
    $('html, body').animate({
        scrollTop:$(divScrollTop).offset().top
    }, 1000);
});
// end scroll top

// filter projects
$(document).ready(function(){
   $('ul.menu-project li a').click(function(){
        $('ul.menu-project li').removeClass('selected');
        $(this).parent('li').addClass('selected');
        thisItem    = $(this).attr('rel'); 
        if(thisItem == "all") {
            $('.project-items div.col-md-3').fadeIn("slow");
        }
        else{
            $('.project-items div.col-md-3[rel='+thisItem+']').fadeIn("slow");
            $('.project-items div.col-md-3[rel!='+thisItem+']').fadeOut("slow");
        }         
   }); 
});
// end filter projects

// one page navigation
$(document).ready(function() {
	$('.nav').onePageNav({
		scrollSpeed:1000,
	});
});
// end one page navigation

// wow jquery
wow = new WOW(
  {
    animateClass: 'animated',
    offset:       100
  }
);
wow.init();
// end wow jqeury

// pie chart
$('#skill').waypoint(function() {
    $('.chart').easyPieChart({
        animate: 2000,
        barColor: '#79cbf2',
        lineCap:'round',
        trackColor: '#f2f2f2',
        scaleColor:false,
        size: 150,
        lineWidth:5,
    });
}, { offset: 320 });
// end pie chart

// croll to fix
/* ----- Minimize and darken the Menu Bar ----- */
$('body').waypoint(function(direction) {
	$('.navbar').toggleClass('change-scroll-menu');
}, { offset: '-500px' });
// end scroll to fix